# a=1
# b=1
# print(id(a))
# print(id(b))#id相同140705486935712
# l=[1,2,3]
# l.append(5)#l的id不变
# id(l)
# l.insert(0, 'b')
# print(l)#['b', 1, 2, 3, 5]
# l=[1,2]
# print(id(l))
# l*=5
# print(l)
# print(id(l))

# w=[1,'a']
# w
# [1, 'a']
# id(w)
# 2197504047360
# w*=3
# w
# [1, 'a', 1, 'a', 1, 'a']
# id(w)
# 2197504047360#同
# l=[1,2,3,4]
# l[::2]
# l[::3]
# l.insert(l.index(2),'test001')#找到指定位置，插入元素；
# print(l)
#
# l
# ['a_1', 'a_2', 'b', 'c']
# l[:2]='a'
# l
# ['a', 'b', 'c']
# l
# ['a', 'b', 'c']
# reversed(l)
# <list_reverseiterator object at 0x0000027F64BF6EB0>
# l
# ['a', 'b', 'c']
# x=reversed(l)
# x
# <list_reverseiterator object at 0x0000027F64BE7CA0>
# list(x)
# ['c', 'b', 'a']
# t1=(1,2,3,4,5,'g','d')
# t1
# (1, 2, 3, 4, 5, 'g', 'd')
# t1[3]
# 4
# t1.index(5)
# 4
# t1.index('g')
# 5
# t1[:3]
# (1, 2, 3)
# t1[:5]
# (1, 2, 3, 4, 5)
# d={"a":1,"d":'s'}
# d
# {'a': 1, 'd': 's'}
# d.keys()
# dict_keys(['a', 'd'])
# list(d.keys())  #转成list
# ['a', 'd']
# d={"a":1,"d":'s'}
# d
# {'a': 1, 'd': 's'}
# d.keys()
# dict_keys(['a', 'd'])
# list(d.keys())  #转成list
# ['a', 'd']
#
# d.values()
# dict_values([1, 's'])
# d.items()
# dict_items([('a', 1), ('d', 's')])
#
#
# d.items()

# popitem()
# 对于人来说, 相当于随机返回一个item
# d
# {'d': 's', 'b': 200, 'c': 300}
# d.popitem()
# ('c', 300)
# d
# {'d': 's', 'b': 200}

# s=set('s')
# s
# {'s'}
# s.add('d')
# s
# {'s', 'd'}
# 's' in s
# True

# s
# {'ss', 's'}
# s2
# {'rr', 'r'}
# id(s)
# 2031139019456
# id(s2)
# 2031139019008
# s.union(s2)
# {'ss', 's', 'rr', 'r'}
# # s
# s
# {'ss', 's', 's1'}
# s.pop() #随机删除一个元素
# 'ss'
#
# s
# {'s', 's1'}